package com.eastfair.venuebooking.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 报价书详情
 * </p>
 *
 * @author linan
 * @since 2022-06-08
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("vb_quotation_detail")
@ApiModel(value = "QuotationDetail", description = "报价书详情")
@AllArgsConstructor
public class QuotationDetail extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 报价书id
     */
    @ApiModelProperty(value = "报价书id")
    @TableField(value = "quotition_id")
    @Excel(name = "报价书id")
    private Long quotitionId;

    /**
     * 展厅id
     */
    @ApiModelProperty(value = "展厅id")
    @TableField(value = "space_id")
    @Excel(name = "展厅id")
    private Long spaceId;

    /**
     * 展厅名称
     */
    @ApiModelProperty(value = "展厅名称")
    @Size(max = 255, message = "展厅名称长度不能超过255")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展厅名称")
    private String spaceName;

    /**
     * 单价
     */
    @ApiModelProperty(value = "单价")
    @TableField(value = "price")
    @Excel(name = "单价")
    private BigDecimal price;

    /**
     * 计价面积
     */
    @ApiModelProperty(value = "计价面积")
    @Size(max = 255, message = "计价面积长度不能超过255")
    @TableField(value = "price_area", condition = LIKE)
    @Excel(name = "计价面积")
    private String priceArea;

    /**
     * 计价时长
     */
    @ApiModelProperty(value = "计价时长")
    @TableField(value = "price_duration")
    @Excel(name = "计价时长")
    private BigDecimal priceDuration;

    /**
     * 计价单位
     */
    @ApiModelProperty(value = "计价单位")
    @Size(max = 255, message = "计价单位长度不能超过255")
    @TableField(value = "price_unit", condition = LIKE)
    @Excel(name = "计价单位")
    private String priceUnit;

    /**
     * 展厅确定时长
     */
    @ApiModelProperty(value = "展厅确定时长")
    @TableField(value = "ascertain_time")
    @Excel(name = "展厅确定时长")
    private Integer ascertainTime;

    /**
     * 折扣前总价
     */
    @ApiModelProperty(value = "折扣前总价")
    @TableField(value = "amount")
    @Excel(name = "折扣前总价")
    private BigDecimal amount;

    /**
     * 折扣后总价
     */
    @ApiModelProperty(value = "折扣后总价")
    @Size(max = 255, message = "折扣后总价长度不能超过255")
    @TableField(value = "discount_amount", condition = LIKE)
    @Excel(name = "折扣后总价")
    private String discountAmount;

    /**
     * 折扣
     */
    @ApiModelProperty(value = "折扣")
    @TableField(value = "discount_percent")
    @Excel(name = "折扣")
    private Integer discountPercent;

    /**
     * 场地保证金
     */
    @ApiModelProperty(value = "场地保证金")
    @TableField(value = "space_deposit")
    @Excel(name = "场地保证金")
    private BigDecimal spaceDeposit;

    /**
     * 服务预付款
     */
    @ApiModelProperty(value = "服务预付款")
    @TableField(value = "service_advance_charge")
    @Excel(name = "服务预付款")
    private BigDecimal serviceAdvanceCharge;


    @Builder
    public QuotationDetail(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long quotitionId, Long spaceId, String spaceName, BigDecimal price, String priceArea, BigDecimal priceDuration, 
                    String priceUnit, Integer ascertainTime, BigDecimal amount, String discountAmount, Integer discountPercent) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.quotitionId = quotitionId;
        this.spaceId = spaceId;
        this.spaceName = spaceName;
        this.price = price;
        this.priceArea = priceArea;
        this.priceDuration = priceDuration;
        this.priceUnit = priceUnit;
        this.ascertainTime = ascertainTime;
        this.amount = amount;
        this.discountAmount = discountAmount;
        this.discountPercent = discountPercent;
    }

}
